﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VatTuDTO;
using VatTuBUS1;

namespace CungUngXayDung
{
    public partial class LoaiSanPham : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Session["LuuURL"] = "LoaiSanPham.aspx";
             int maLoaiSanPham = int.Parse(Request.QueryString["id"].ToString());
             LoadSanPhamTheoLoai(maLoaiSanPham);
        }
        void LoadSanPhamTheoLoai(int maLoai)
        {
            if (maLoai <= 0)
                maLoai = 2;
            List<SanPhamDTO> lst = new List<SanPhamDTO>();
            lst = new SanPhamBUS().SelectSanPhamTheoLoai(maLoai);
            listProduct.DataSource = lst;
            listProduct.DataBind();
        }
    }
}